Repository navigation
Address cube and Meshopt review follow-ups - #1910
bkaradzic-microsoft merged 4 commits into
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 2
Open (6)
This loop has no overall timeout, so if the promise is never fulfilled (e.g., readback callback not… · New This multisampled-cube rejection only inspectscolorTextures. Ifsamples > 1and… · New Using a plain object as a set (seen[id]) can collide with inherited keys (e.g.,__proto__) and… · New The self-check runs unconditionally at script load and throws on failure, which can abort the… · New The self-check runs unconditionally at script load and throws on failure, which can abort the… · New The self-check runs unconditionally at script load and throws on failure, which can abort the… · New
What changed in this PR
Follow-up changes addressing prior review feedback around cube render targets, native validation readiness/convergence logic, and Meshopt export documentation.
Changes:
- Reject multisampled cube render targets and ensure cube render-target faces are zero-initialized.
- Make native validation convergence time-based (60s) and broaden readiness checks across render passes / cameras / utility layers.
- Clarify
_native.decodeMeshoptas a compatibility export in code comments/docs.
| File | Description |
|---|---|
| Plugins/NativeMeshopt/Source/NativeMeshopt.cpp | Updates comments clarifying decodeMeshopt as a compatibility export. |
| Plugins/NativeMeshopt/README.md | Updates documentation of the compatibility entry point behavior/usage. |
| Plugins/NativeMeshopt/Include/Babylon/Plugins/NativeMeshopt.h | Updates header comments to match current Babylon.js Meshopt behavior. |
| Plugins/NativeEngine/Source/NativeEngine.cpp | Adds explicit rejection of multisampled cube render targets during init and framebuffer creation. |
| Documentation/AddingNewValidationTests.md | Updates guidance to reflect new convergence and render-pass readiness behavior. |
| Core/Graphics/Source/Texture.cpp | Zero-fills cube RT memory on creation to match WebGL semantics. |
| Apps/UnitTests/Source/Tests.NativeEngine.CubeRenderTargets.cpp | Adds a unit test for multisample rejection + zero-fill behavior. |
| Apps/Playground/Scripts/validation_native.js | Reworks convergence logic and render-pass enumeration; adds scheduling self-check. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 2
Open (3)
hasPassIdcurrently treats any non-null/undefined value (includingNaN, objects, and strings)… · New The new multisample rejection for a cubedepthStencilTextureattachment is not covered by the… · New The same error string is duplicated in multiple places in this file for the same condition. To… · New
Resolved since last review (6)
This multisampled-cube rejection only inspectscolorTextures. Ifsamples > 1and… This loop has no overall timeout, so if the promise is never fulfilled (e.g., readback callback not… The self-check runs unconditionally at script load and throws on failure, which can abort the… The self-check runs unconditionally at script load and throws on failure, which can abort the… The self-check runs unconditionally at script load and throws on failure, which can abort the… Using a plain object as a set (seen[id]) can collide with inherited keys (e.g.,__proto__) and…
8d03a0d to
feb0a00
Compare
Reject multisampled cube render targets instead of creating framebuffers that read back as zeros. Zero-fill cube render-target faces to match WebGL texImage2D(null), and read them before any clear. Bound validation convergence by elapsed time, inspect every render pass the next frame can use, and enroll only utility layers that render automatically. Poll every associated scene before combining readiness. Describe decodeMeshopt as a compatibility export that pinned Babylon.js 9.21.2 and current MeshoptCompression do not consume. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e6c3c123-c355-4790-a3d4-94337ed6e052
Fail the cube readback test if the promise is not fulfilled within 30 seconds. Reject a multisampled cube used as the depth attachment as well as a color attachment. Deduplicate render passes with a Set, and report scheduling self-check failures without aborting the validation suite. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e6c3c123-c355-4790-a3d4-94337ed6e052
feb0a00 to
53e2e6d
Compare
BabylonJS#1890 is being replaced, so revert the validation_native.js and documentation changes made in response to its review. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c46f0590-2707-466b-93c7-bb74316f385a
Replace the CPU zero-filled cube upload with the clear-based path from BabylonJS#1884. ClearRenderTarget now takes a cubeMap flag: color cubes use bgfx::clear (which covers every face on all backends), and depth cubes clear each face through a framebuffer attachment. Finish the active frame before failing the cube readback timeout so the test reports a normal failure instead of terminating the process. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 97f1ddbf-b571-4a6c-8cb3-411b37e0d15a



Follow-up for review comments on #1885 and #1897, rebased onto
3428526fafter #1913 merged._native.decodeMeshoptis a compatibility export unused by stock Babylon.js.The validation-runner follow-ups for #1890 were dropped because #1890 is being replaced.